import {
  createRouter,
  createWebHashHistory,
  createWebHistory,
} from "vue-router";
import Home from "../views/Home/index.vue";
const routes = [
  {
    path: "/",
    name: "home",
    component: Home,
    // redirect: '/main/HomeView',
    children: [
      {
        path: "/",
        component: () =>
          import(/* webpackChunkName: "list" */ "../views/Main/index.vue"),
      },
      {
        path: "/home/file",
        component: () =>
          import(/* webpackChunkName: "list" */ "../views/File/index.vue"),
      },
    ],
  }
];

const router = createRouter({
  history: createWebHashHistory(), //hash描点模式
  // history: createWebHistory(),//路径模式
  routes,
});

export default router;
